#ifndef LAURIN_SCAN_RESULT_MODEL_H_
#define LAURIN_SCAN_RESULT_MODEL_H_

#include "../core/network/laurin-80211-network-set.h"
#include "../core/network/laurin-ip-network.h"
#include <gtkmm/liststore.h>
#include <gtkmm/treemodel.h>
#include <gtkmm/treemodelcolumn.h>


class LaurinScanResultModelRecord: public Gtk::TreeModel::ColumnRecord
{

	public:

		LaurinScanResultModelRecord();

		Gtk::TreeModelColumn<int> sequence;
		Gtk::TreeModelColumn<Glib::ustring> ssid;
		Gtk::TreeModelColumn<Glib::ustring> bssid;
		Gtk::TreeModelColumn<Glib::ustring> mac;
		Gtk::TreeModelColumn<Glib::ustring> ip;
		Gtk::TreeModelColumn<Glib::ustring> distance;
		Gtk::TreeModelColumn<Glib::ustring> type;

};




class LaurinScanAccessPointModelRecord: public Gtk::TreeModel::ColumnRecord
{
	public:


		LaurinScanAccessPointModelRecord();

		Gtk::TreeModelColumn<Glib::ustring> ssid;
		Gtk::TreeModelColumn<Glib::ustring> bssid;
		Gtk::TreeModelColumn<double> distance;
};




class LaurinScanAccessPointModel
{
	public:

		Glib::RefPtr<Gtk::ListStore> getStore();
		void clear();

		LaurinScanAccessPointModelRecord record;

	private:

		Glib::RefPtr<Gtk::ListStore> _store;
};




class LaurinScanResultModel
{
	public:

		LaurinScanResultModel();

		Glib::RefPtr<Gtk::ListStore> getStore();
		LaurinScanAccessPointModel* getAccessPointModel();
		void set80211NetworkSet(Laurin80211NetworkSet* networks);
		void setIPNetwork(LaurinIPNetwork* network);
		void fillResult();
		void clear();


		LaurinScanResultModelRecord record;

	private:

		Glib::RefPtr<Gtk::ListStore> _store;
		LaurinScanAccessPointModel _ap_model;

		Laurin80211NetworkSet* _networks;
		LaurinIPNetwork* _ip_network;
};

#endif
